<div class="{className}{domRandomClass}">

</div>
<script>
    import { onMount } from "svelte";
    let domRandomClass=`img_${parseInt(Math.random()*100000000)}`
    let iObserver=null;
    export let className = "";
    onMount(()=>{
        iObserver = new IntersectionObserver(function(entries) {
            if (entries[0].intersectionRatio <= 0) return;
        });
        iObserver.observe(document.querySelector(`.${domRandomClass}`));
    })
</script>